#include <stdio.h>

int main()
{
    int n = 0, sum = 1;
    scanf("%d", &n);
    if (n == 0)
    {
        printf("%d", n);
        return 0;
    }

    while (n != 0)
    {
        sum = n * sum;
        n--;
    }
    printf("%d", sum);
    return 0;
}